package com.glamour.hlcity.web;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class WebBeanFactory implements ApplicationContextAware {

	ApplicationContext applicationContext;
	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		this.applicationContext=applicationContext;
	}
	
	/**
	 * 默认通用的获得bean的函数
	 * @param beanName
	 * @return
	 */
	public Object getBean(String beanName){
		return applicationContext.getBean(beanName);
	}

}
